package com.anrongtec.zcpt.model;

import android.graphics.drawable.Drawable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.enums.AssignType;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * 作者：liuhui on 2017/2/12 11:39
 * 邮箱：liu594545591@126.com
 * 描述：AppModel
 */

public class AppModel implements Serializable {

    /**
     * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
     */
//	private static final long serialVersionUID = 1L;
    @SerializedName("name")
    @Expose()
    private String appName;// 应用名称

    @SerializedName("pkg")
    @Expose()
    @PrimaryKey(AssignType.BY_MYSELF)
    private String appPackName;// 包名

    // 本地版本号
    @Expose()
    private int localVersionCode;

    // 本地版本名称
    @Expose()
    private String localVersionName;

    // 远程版本号
    @SerializedName("versionCode")
    @Expose()
    private int remoteVersionCode;

    // 远程版本名称
    @SerializedName("version")
    @Expose()
    private String remoteVersionName;

    // 远程版本大小
    @Expose()
    private long remoteSize;

    @Expose()
    private String description;// 应用描述

    @Expose()
    private String versionDesc;//版本描述

    @SerializedName("screenshots")
    @Expose
    private ArrayList<FileId> pics;//展示图片

    @Expose
    private long size;// 大小

    @SerializedName("apk")
    @Expose()
    private String url;// 链接

    @SerializedName("icon")
    @Expose()
    private String iconUrl;// 图标路径

    @Expose()
    private String appProducer;// 生产厂家

    @Expose()
    private String packCreatTime;// 版本时间

    @Expose()
    private float score;// 平均得分

    @Expose()
    private String holdUnit;//所属单位

    //	private ArrayList<Type> busType;//功能分类
    @Expose
    private String busType;//功能分类值

    @Expose
    private String busTypeName;//功能名字

    @Expose
    private ArrayList<Type> policeType;//警种分类

    @Expose
    private ArrayList<Type> areaType;//区域分类

    @Expose
    private boolean isNeedUpgrade = false;//是否有新版本需要下载更新

    /**
     * 以下属性不做存储
     */
    private Drawable localIcon;// 图标
    private long firstInstallTime;// 安装时间
    private long lastUpdateTime;//上次更新时间
    public String[] requestedPermissions;// 应用权限
    private String installPath;// 安装路径



    public boolean isNeedUpgrade() {
        return isNeedUpgrade;
    }
    public void setNeedUpgrade(boolean isNeedUpgrade) {
        this.isNeedUpgrade = isNeedUpgrade;
    }
    public String getAppName() {
        return appName;
    }
    public void setAppName(String appName) {
        this.appName = appName;
    }
    public String getAppPackName() {
        return appPackName;
    }
    public void setAppPackName(String appPackName) {
        this.appPackName = appPackName;
    }
    public ArrayList<FileId> getPics() {
        return pics;
    }
    public void setPics(ArrayList<FileId> pics) {
        this.pics = pics;
    }
    public String getBusType() {
        return busType;
    }
    public void setBusType(String busType) {
        this.busType = busType;
    }
    public String getBusTypeName() {
        return busTypeName;
    }
    public void setBusTypeName(String busTypeName) {
        this.busTypeName = busTypeName;
    }
    public ArrayList<Type> getPoliceType() {
        return policeType;
    }
    public void setPoliceType(ArrayList<Type> policeType) {
        this.policeType = policeType;
    }
    public ArrayList<Type> getAreaType() {
        return areaType;
    }
    public void setAreaType(ArrayList<Type> areaType) {
        this.areaType = areaType;
    }
    public int getLocalVersionCode() {
        return localVersionCode;
    }
    public void setLocalVersionCode(int localVersionCode) {
        this.localVersionCode = localVersionCode;
    }
    public String getLocalVersionName() {
        return localVersionName;
    }
    public void setLocalVersionName(String localVersionName) {
        this.localVersionName = localVersionName;
    }
    public int getRemoteVersionCode() {
        return remoteVersionCode;
    }
    public void setRemoteVersionCode(int remoteVersionCode) {
        this.remoteVersionCode = remoteVersionCode;
    }
    public String getRemoteVersionName() {
        return remoteVersionName;
    }
    public void setRemoteVersionName(String remoteVersionName) {
        this.remoteVersionName = remoteVersionName;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    public String getVersionDesc() {
        return versionDesc;
    }
    public void setVersionDesc(String versionDesc) {
        this.versionDesc = versionDesc;
    }
    public long getSize() {
        return size;
    }
    public void setSize(long size) {
        this.size = size;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public String getIconUrl() {
        return iconUrl;
    }
    public void setIconUrl(String iconPath) {
        this.iconUrl = iconPath;
    }
    public String getAppProducer() {
        return appProducer;
    }
    public void setAppProducer(String appProducer) {
        this.appProducer = appProducer;
    }
    public String getPackCreatTime() {
        return packCreatTime;
    }
    public void setPackCreatTime(String packCreatTime) {
        this.packCreatTime = packCreatTime;
    }
    public float getScore() {
        return score;
    }
    public void setScore(float score) {
        this.score = score;
    }
    public String getHoldUtil() {
        return holdUnit;
    }
    public void setHoldUtil(String holdUtil) {
        this.holdUnit = holdUtil;
    }
    //	public List<FileId> getPics() {
//		return pics;
//	}
    public String getHoldUnit() {
        return holdUnit;
    }
    public void setHoldUnit(String holdUnit) {
        this.holdUnit = holdUnit;
    }
    //	public ArrayList<Type> getBusType() {
//		return busType;
//	}
//	public void setBusType(ArrayList<Type> busType) {
//		this.busType = busType;
//	}
//	public ArrayList<Type> getPoliceType() {
//		return policeType;
//	}
//	public void setPoliceType(ArrayList<Type> policeType) {
//		this.policeType = policeType;
//	}
//	public ArrayList<Type> getAreaType() {
//		return areaType;
//	}
//	public void setAreaType(ArrayList<Type> areaType) {
//		this.areaType = areaType;
//	}
//	public void setPics(ArrayList<FileId> pics) {
//		this.pics = pics;
//	}
//	public static long getSerialversionuid() {
//		return serialVersionUID;
//	}
    public long getFirstInstallTime() {
        return firstInstallTime;
    }
    public void setFirstInstallTime(long firstInstallTime) {
        this.firstInstallTime = firstInstallTime;
    }
    public String[] getRequestedPermissions() {
        return requestedPermissions;
    }
    public void setRequestedPermissions(String[] requestedPermissions) {
        this.requestedPermissions = requestedPermissions;
    }
    public String getInstallPath() {
        return installPath;
    }

    public void setInstallPath(String installPath) {
        this.installPath = installPath;
    }
    public long getLastUpdateTime() {
        return lastUpdateTime;
    }
    public void setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
    public Drawable getLocalIcon() {
        return localIcon;
    }
    public void setLocalIcon(Drawable localIcon) {
        this.localIcon = localIcon;
    }
    public long getRemoteSize() {
        return remoteSize;
    }
    public void setRemoteSize(long remoteSize) {
        this.remoteSize = remoteSize;
    }


}

